<template>
  <div class="layout-container">
    <el-container>
      <el-aside width="260px">
        <div class="logo"></div>
        <el-menu 
          router
          unique-opened
          default-active="/main/home"
          class="el-menu-vertical-demo"
          background-color="#FF674B"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="/main/home">
            <template slot="title">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </template>
          </el-menu-item> 
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-setting"></i>
              <span>系统设置</span>
            </template>
            <el-menu-item index="/main/menu">菜单管理</el-menu-item>
            <el-menu-item index="/main/role">角色管理</el-menu-item>
            <el-menu-item index="/main/manager">管理员管理</el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-s-goods"></i>
              <span>商城管理</span>
            </template>
            <el-menu-item index="/main/cate">分类管理</el-menu-item>
            <el-menu-item index="3-2">规则管理</el-menu-item>
            <el-menu-item index="3-3">商品管理</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header>
          <el-dropdown>
            <span class="el-dropdown-link">
              admin<i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>安全退出</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </el-header>
        <el-main>
            <!-- 二级路由视图-->
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {

};
</script>

<style scoped>
.el-container {
  height: 100vh;
}
.logo{
  width: 260px;
  height: 60px;
  background: url("../assets/images/logo-white.f0f9bec7.png") no-repeat center center;
  background-size: 200px 46px;
  background-color: #FF674B;
}
.el-header{
  display: flex;
  flex-direction: row-reverse;
  background-color: white;
  color: #333;
  line-height: 60px;
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
}
.el-menu {
  height: calc(100vh - 60px);
  border-right: none;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
}
.is-active{
  background: white !important;
  color: #f63b1a !important;
}
body > .el-container {
  margin-bottom: 40px;
}
</style>